From: Yuan Fu Date: Thu, 9 May 2024 03:50:24 +0000 (-0700) Subject: Fix #if defined directive fontification in c-ts-mode X-Git-Tag: archive/raspbian/1%30.1+1-3+rpi1^2~14^2~18^2~1588 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=80ba6b7b96aad3659675b76a8965788fd0d73476;p=emacs.git Fix #if defined directive fontification in c-ts-mode * lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings): Fontify each part separately so the identifier isn't overriden. --- diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index 2d431d75d21..730671da781 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el @@ -617,8 +617,11 @@ MODE is either `c' or `cpp'." (preproc_params (identifier) @font-lock-variable-name-face) - (preproc_defined) @font-lock-preprocessor-face - (preproc_defined (identifier) @font-lock-variable-name-face) + (preproc_defined + "defined" @font-lock-preprocessor-face + "(" @font-lock-preprocessor-face + (identifier) @font-lock-variable-name-face + ")" @font-lock-preprocessor-face) [,@c-ts-mode--preproc-keywords] @font-lock-preprocessor-face) :language mode